#pragma once

#include <cstdint>

class Graphics;

class TetrisMap
{
private:
	uint16_t *mapData;
	int height;
public:
	TetrisMap(int height);


	void move(int x, int y, int toX, int toY);
	void destory(int x, int y);

	bool isFull(int yline);
	void clearLine(int yline);

	bool place(int x, int y);
	bool exist(int x, int y);
	bool floating(int x, int y);

	static void drawMap(Graphics* graphics, TetrisMap& map, int x, int y);
};